var e = getApp();

Page({
    data: {
        listArr: []
    },
    onLoad: function(e) {
        this.initData(), this.getData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    initData: function() {
        this.setData({
            listArr: []
        });
    },
    getData: function() {
        var t = this, a = e.getNetAddresss("plugin.universal-card.api.home.get-level");
        e._getNetWork({
            url: a,
            success: function(e) {
                var a = e.data;
                1 == a.result && t.setData({
                    listArr: a.data.member_level
                });
            },
            fail: function(e) {
                console.log(e);
            }
        });
    },
    openSubmit: function(t) {
        var a = t.currentTarget.dataset.item;
        e._isTextEmpty(a.has_one_universal_level.goods_spec) ? wx.navigateTo({
            url: "/packageC/o2o/card/new_card/new_card?level_id=" + a.id
        }) : wx.navigateTo({
            url: "/packageC/o2o/card/new_card/new_card?level_id=" + a.id + "&spec=goods_spec"
        });
    }
});